home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / clib / graphics_protos.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  14KB  |  293 lines

  1. #ifndef  CLIB_GRAPHICS_PROTOS_H
  2. #define  CLIB_GRAPHICS_PROTOS_H
  3.  
  4. /*
  5. **    $VER: graphics_protos.h 39.31 (29.4.93)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  GRAPHICS_GFX_H
  15. #include <graphics/gfx.h>
  16. #endif
  17. #ifndef  GRAPHICS_DISPLAYINFO_H
  18. #include <graphics/displayinfo.h>
  19. #endif
  20. #ifndef  GRAPHICS_GELS_H
  21. #include <graphics/gels.h>
  22. #endif
  23. #ifndef  GRAPHICS_RASTPORT_H
  24. #include <graphics/rastport.h>
  25. #endif
  26. #ifndef  GRAPHICS_VIEW_H
  27. #include <graphics/view.h>
  28. #endif
  29. #ifndef  GRAPHICS_COPPER_H
  30. #include <graphics/copper.h>
  31. #endif
  32. #ifndef  GRAPHICS_CLIP_H
  33. #include <graphics/clip.h>
  34. #endif
  35. #ifndef  GRAPHICS_REGIONS_H
  36. #include <graphics/regions.h>
  37. #endif
  38. #ifndef  GRAPHICS_SPRITE_H
  39. #include <graphics/sprite.h>
  40. #endif
  41. #ifndef  GRAPHICS_TEXT_H
  42. #include <graphics/text.h>
  43. #endif
  44. #ifndef  HARDWARE_BLIT_H
  45. #include <hardware/blit.h>
  46. #endif
  47. /*------ BitMap primitives ------*/
  48. LONG BltBitMap( struct BitMap *srcBitMap, long xSrc, long ySrc,
  49.     struct BitMap *destBitMap, long xDest, long yDest, long xSize,
  50.     long ySize, unsigned long minterm, unsigned long mask,
  51.     PLANEPTR tempA );
  52. void BltTemplate( PLANEPTR source, long xSrc, long srcMod,
  53.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  54.     long ySize );
  55. /*------ Text routines ------*/
  56. void ClearEOL( struct RastPort *rp );
  57. void ClearScreen( struct RastPort *rp );
  58. WORD TextLength( struct RastPort *rp, STRPTR string, unsigned long count );
  59. LONG Text( struct RastPort *rp, STRPTR string, unsigned long count );
  60. LONG SetFont( struct RastPort *rp, struct TextFont *textFont );
  61. struct TextFont *OpenFont( struct TextAttr *textAttr );
  62. void CloseFont( struct TextFont *textFont );
  63. ULONG AskSoftStyle( struct RastPort *rp );
  64. ULONG SetSoftStyle( struct RastPort *rp, unsigned long style,
  65.     unsigned long enable );
  66. /*------    Gels routines ------*/
  67. void AddBob( struct Bob *bob, struct RastPort *rp );
  68. void AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  69. void DoCollision( struct RastPort *rp );
  70. void DrawGList( struct RastPort *rp, struct ViewPort *vp );
  71. void InitGels( struct VSprite *head, struct VSprite *tail,
  72.     struct GelsInfo *gelsInfo );
  73. void InitMasks( struct VSprite *vSprite );
  74. void RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  75. void RemVSprite( struct VSprite *vSprite );
  76. void SetCollision( unsigned long num,
  77.     void (*routine)(struct VSprite *vSprite, APTR),
  78.     struct GelsInfo *gelsInfo );
  79. void SortGList( struct RastPort *rp );
  80. void AddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey,
  81.     struct RastPort *rp );
  82. void Animate( struct AnimOb **anKey, struct RastPort *rp );
  83. BOOL GetGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  84. void InitGMasks( struct AnimOb *anOb );
  85. /*------    General graphics routines ------*/
  86. void DrawEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  87.     long b );
  88. LONG AreaEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  89.     long b );
  90. void LoadRGB4( struct ViewPort *vp, UWORD *colors, long count );
  91. void InitRastPort( struct RastPort *rp );
  92. void InitVPort( struct ViewPort *vp );
  93. ULONG MrgCop( struct View *view );
  94. ULONG MakeVPort( struct View *view, struct ViewPort *vp );
  95. void LoadView( struct View *view );
  96. void WaitBlit( void );
  97. void SetRast( struct RastPort *rp, unsigned long pen );
  98. void Move( struct RastPort *rp, long x, long y );
  99. void Draw( struct RastPort *rp, long x, long y );
  100. LONG AreaMove( struct RastPort *rp, long x, long y );
  101. LONG AreaDraw( struct RastPort *rp, long x, long y );
  102. LONG AreaEnd( struct RastPort *rp );
  103. void WaitTOF( void );
  104. void QBlit( struct bltnode *blit );
  105. void InitArea( struct AreaInfo *areaInfo, APTR vectorBuffer,
  106.     long maxVectors );
  107. void SetRGB4( struct ViewPort *vp, long index, unsigned long red,
  108.     unsigned long green, unsigned long blue );
  109. void QBSBlit( struct bltnode *blit );
  110. void BltClear( PLANEPTR memBlock, unsigned long byteCount,
  111.     unsigned long flags );
  112. void RectFill( struct RastPort *rp, long xMin, long yMin, long xMax,
  113.     long yMax );
  114. void BltPattern( struct RastPort *rp, PLANEPTR mask, long xMin, long yMin,
  115.     long xMax, long yMax, unsigned long maskBPR );
  116. ULONG ReadPixel( struct RastPort *rp, long x, long y );
  117. LONG WritePixel( struct RastPort *rp, long x, long y );
  118. BOOL Flood( struct RastPort *rp, unsigned long mode, long x, long y );
  119. void PolyDraw( struct RastPort *rp, long count, WORD *polyTable );
  120. void SetAPen( struct RastPort *rp, unsigned long pen );
  121. void SetBPen( struct RastPort *rp, unsigned long pen );
  122. void SetDrMd( struct RastPort *rp, unsigned long drawMode );
  123. void InitView( struct View *view );
  124. void CBump( struct UCopList *copList );
  125. void CMove( struct UCopList *copList, APTR destination, long data );
  126. void CWait( struct UCopList *copList, long v, long h );
  127. LONG VBeamPos( void );
  128. void InitBitMap( struct BitMap *bitMap, long depth, long width, long height );
  129. void ScrollRaster( struct RastPort *rp, long dx, long dy, long xMin, long yMin,
  130.     long xMax, long yMax );
  131. void WaitBOVP( struct ViewPort *vp );
  132. WORD GetSprite( struct SimpleSprite *sprite, long num );
  133. void FreeSprite( long num );
  134. void ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
  135.     PLANEPTR newData );
  136. void MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, long x,
  137.     long y );
  138. void LockLayerRom( struct Layer *layer );
  139. void UnlockLayerRom( struct Layer *layer );
  140. void SyncSBitMap( struct Layer *layer );
  141. void CopySBitMap( struct Layer *layer );
  142. void OwnBlitter( void );
  143. void DisownBlitter( void );
  144. struct TmpRas *InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer,
  145.     long size );
  146. void AskFont( struct RastPort *rp, struct TextAttr *textAttr );
  147. void AddFont( struct TextFont *textFont );
  148. void RemFont( struct TextFont *textFont );
  149. PLANEPTR AllocRaster( unsigned long width, unsigned long height );
  150. void FreeRaster( PLANEPTR p, unsigned long width, unsigned long height );
  151. void AndRectRegion( struct Region *region, struct Rectangle *rectangle );
  152. BOOL OrRectRegion( struct Region *region, struct Rectangle *rectangle );
  153. struct Region *NewRegion( void );
  154. BOOL ClearRectRegion( struct Region *region, struct Rectangle *rectangle );
  155. void ClearRegion( struct Region *region );
  156. void DisposeRegion( struct Region *region );
  157. void FreeVPortCopLists( struct ViewPort *vp );
  158. void FreeCopList( struct CopList *copList );
  159. void ClipBlit( struct RastPort *srcRP, long xSrc, long ySrc,
  160.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  161.     long ySize, unsigned long minterm );
  162. BOOL XorRectRegion( struct Region *region, struct Rectangle *rectangle );
  163. void FreeCprList( struct cprlist *cprList );
  164. struct ColorMap *GetColorMap( long entries );
  165. void FreeColorMap( struct ColorMap *colorMap );
  166. ULONG GetRGB4( struct ColorMap *colorMap, long entry );
  167. void ScrollVPort( struct ViewPort *vp );
  168. struct CopList *UCopperListInit( struct UCopList *uCopList, long n );
  169. void FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  170. void BltBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  171.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  172.     long ySize, unsigned long minterm );
  173. BOOL OrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  174. BOOL XorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  175. BOOL AndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  176. void SetRGB4CM( struct ColorMap *colorMap, long index, unsigned long red,
  177.     unsigned long green, unsigned long blue );
  178. void BltMaskBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  179.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  180.     long ySize, unsigned long minterm, PLANEPTR bltMask );
  181. BOOL AttemptLockLayerRom( struct Layer *layer );
  182. /*--- functions in V36 or higher (Release 2.0) ---*/
  183. APTR GfxNew( unsigned long gfxNodeType );
  184. void GfxFree( APTR gfxNodePtr );
  185. void GfxAssociate( APTR associateNode, APTR gfxNodePtr );
  186. void BitMapScale( struct BitScaleArgs *bitScaleArgs );
  187. UWORD ScalerDiv( unsigned long factor, unsigned long numerator,
  188.     unsigned long denominator );
  189. WORD TextExtent( struct RastPort *rp, STRPTR string, long count,
  190.     struct TextExtent *textExtent );
  191. ULONG TextFit( struct RastPort *rp, STRPTR string, unsigned long strLen,
  192.     struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
  193.     long strDirection, unsigned long constrainingBitWidth,
  194.     unsigned long constrainingBitHeight );
  195. APTR GfxLookUp( APTR associateNode );
  196. BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  197. BOOL VideoControlTags( struct ColorMap *colorMap, unsigned long tag1Type,
  198.     ... );
  199. struct MonitorSpec *OpenMonitor( STRPTR monitorName,
  200.     unsigned long displayID );
  201. BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
  202. DisplayInfoHandle FindDisplayInfo( unsigned long displayID );
  203. ULONG NextDisplayInfo( unsigned long displayID );
  204. ULONG GetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf,
  205.     unsigned long size, unsigned long tagID, unsigned long displayID );
  206. void FontExtent( struct TextFont *font, struct TextExtent *fontExtent );
  207. LONG ReadPixelLine8( struct RastPort *rp, unsigned long xstart,
  208.     unsigned long ystart, unsigned long width, UBYTE *array,
  209.     struct RastPort *tempRP );
  210. LONG WritePixelLine8( struct RastPort *rp, unsigned long xstart,
  211.     unsigned long ystart, unsigned long width, UBYTE *array,
  212.     struct RastPort *tempRP );
  213. LONG ReadPixelArray8( struct RastPort *rp, unsigned long xstart,
  214.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  215.     UBYTE *array, struct RastPort *temprp );
  216. LONG WritePixelArray8( struct RastPort *rp, unsigned long xstart,
  217.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  218.     UBYTE *array, struct RastPort *temprp );
  219. LONG GetVPModeID( struct ViewPort *vp );
  220. LONG ModeNotAvailable( unsigned long modeID );
  221. WORD WeighTAMatch( struct TextAttr *reqTextAttr,
  222.     struct TextAttr *targetTextAttr, struct TagItem *targetTags );
  223. WORD WeighTAMatchTags( struct TextAttr *reqTextAttr,
  224.     struct TextAttr *targetTextAttr, unsigned long tag1Type, ... );
  225. void EraseRect( struct RastPort *rp, long xMin, long yMin, long xMax,
  226.     long yMax );
  227. ULONG ExtendFont( struct TextFont *font, struct TagItem *fontTags );
  228. ULONG ExtendFontTags( struct TextFont *font, unsigned long tag1Type, ... );
  229. void StripFont( struct TextFont *font );
  230. /*--- functions in V39 or higher (Release 3) ---*/
  231. UWORD CalcIVG( struct View *v, struct ViewPort *vp );
  232. LONG AttachPalExtra( struct ColorMap *cm, struct ViewPort *vp );
  233. LONG ObtainBestPenA( struct ColorMap *cm, unsigned long r, unsigned long g,
  234.     unsigned long b, struct TagItem *tags );
  235. LONG ObtainBestPen( struct ColorMap *cm, unsigned long r, unsigned long g,
  236.     unsigned long b, unsigned long tag1Type, ... );
  237. void SetRGB32( struct ViewPort *vp, unsigned long n, unsigned long r,
  238.     unsigned long g, unsigned long b );
  239. ULONG GetAPen( struct RastPort *rp );
  240. ULONG GetBPen( struct RastPort *rp );
  241. ULONG GetDrMd( struct RastPort *rp );
  242. ULONG GetOutlinePen( struct RastPort *rp );
  243. void LoadRGB32( struct ViewPort *vp, ULONG *table );
  244. ULONG SetChipRev( unsigned long want );
  245. void SetABPenDrMd( struct RastPort *rp, unsigned long apen, unsigned long bpen,
  246.     unsigned long drawmode );
  247. void GetRGB32( struct ColorMap *cm, unsigned long firstcolor,
  248.     unsigned long ncolors, ULONG *table );
  249. struct BitMap *AllocBitMap( unsigned long sizex, unsigned long sizey,
  250.     unsigned long depth, unsigned long flags,
  251.     struct BitMap *friend_bitmap );
  252. void FreeBitMap( struct BitMap *bm );
  253. LONG GetExtSpriteA( struct ExtSprite *ss, struct TagItem *tags );
  254. LONG GetExtSprite( struct ExtSprite *ss, unsigned long tag1Type, ... );
  255. ULONG CoerceMode( struct ViewPort *vp, unsigned long monitorid,
  256.     unsigned long flags );
  257. void ChangeVPBitMap( struct ViewPort *vp, struct BitMap *bm,
  258.     struct DBufInfo *db );
  259. void ReleasePen( struct ColorMap *cm, unsigned long n );
  260. ULONG ObtainPen( struct ColorMap *cm, unsigned long n, unsigned long r,
  261.     unsigned long g, unsigned long b, long f );
  262. ULONG GetBitMapAttr( struct BitMap *bm, unsigned long attrnum );
  263. struct DBufInfo *AllocDBufInfo( struct ViewPort *vp );
  264. void FreeDBufInfo( struct DBufInfo *dbi );
  265. ULONG SetOutlinePen( struct RastPort *rp, unsigned long pen );
  266. ULONG SetWriteMask( struct RastPort *rp, unsigned long msk );
  267. void SetMaxPen( struct RastPort *rp, unsigned long maxpen );
  268. void SetRGB32CM( struct ColorMap *cm, unsigned long n, unsigned long r,
  269.     unsigned long g, unsigned long b );
  270. void ScrollRasterBF( struct RastPort *rp, long dx, long dy, long xMin,
  271.     long yMin, long xMax, long yMax );
  272. LONG FindColor( struct ColorMap *cm, unsigned long r, unsigned long g,
  273.     unsigned long b, long maxcolor );
  274. struct ExtSprite *AllocSpriteDataA( struct BitMap *bm, struct TagItem *tags );
  275. struct ExtSprite *AllocSpriteData( struct BitMap *bm, unsigned long tag1Type,
  276.     ... );
  277. LONG ChangeExtSpriteA( struct ViewPort *vp, struct ExtSprite *oldsprite,
  278.     struct ExtSprite *newsprite, struct TagItem *tags );
  279. LONG ChangeExtSprite( struct ViewPort *vp, struct ExtSprite *oldsprite,
  280.     struct ExtSprite *newsprite, unsigned long tag1Type, ... );
  281. void FreeSpriteData( struct ExtSprite *sp );
  282. void SetRPAttrsA( struct RastPort *rp, struct TagItem *tags );
  283. void SetRPAttrs( struct RastPort *rp, unsigned long tag1Type, ... );
  284. void GetRPAttrsA( struct RastPort *rp, struct TagItem *tags );
  285. void GetRPAttrs( struct RastPort *rp, unsigned long tag1Type, ... );
  286. ULONG BestModeIDA( struct TagItem *tags );
  287. ULONG BestModeID( unsigned long tag1Type, ... );
  288. /*--- functions in V40 or higher (Release 3.1) ---*/
  289. void WriteChunkyPixels( struct RastPort *rp, unsigned long xstart,
  290.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  291.     UBYTE *array, long bytesperrow );
  292. #endif     /* CLIB_GRAPHICS_PROTOS_H */
  293.